﻿Imports DAO
Imports DTO
Public Class NhomHangBUS
    Public Shared Function LayDSNhomHang() As DataTable
        Return NhomHangDAO.LayDSNhomHang()
    End Function

    Public Shared Function LayDSNhomHangCbx() As DataTable
        Return NhomHangDAO.LayDSNhomHangCbx()
    End Function

    Public Shared Function ThemNhomHang(nh As NhomHangDTO) As Boolean
        Dim kt As Boolean = True
        If nh.TenNhomHang.Length = 0 Then
            Return False
        End If
        NhomHangDAO.ThemNhomHang(nh)
        Return kt
    End Function

    Public Shared Function CapNhatNhomHang(nh As NhomHangDTO) As Boolean
        Dim kt As Boolean = True
        If nh.TenNhomHang.Length = 0 Then
            Return False
        End If
        NhomHangDAO.CapNhatNhomHang(nh)
        Return kt
    End Function

    Public Shared Function XoaNhomHang(nh As NhomHangDTO) As Boolean
        Dim kt As Boolean = True
        NhomHangDAO.XoaNhomHang(nh)
        Return kt
    End Function

    Public Shared DongKetNoi As SqlClient.SqlConnection = CKetNoi.Connect
End Class
